﻿using Newtonsoft.Json;

namespace BLWCMS.Core.Business
{
    public static class ResCode
    {
        /// <summary>
        /// 提交成功
        /// </summary>
        /// <returns></returns>
        public static string N200(string res,string returnUrl)
        {
            var resTxt = new { code = "N200", msg = res, returnurl = returnUrl };
            return JsonConvert.SerializeObject(resTxt);
        }

        /// <summary>
        /// 提交失败
        /// </summary>
        /// <param name="err"></param>
        /// <returns></returns>
        public static string N500(string err)
        {
            var resTxt = new { code = "N500", msg = err };
            return JsonConvert.SerializeObject(resTxt);
        }
    }
}
